package com.sphd.emanu.activity.cardmessage;

import android.content.Context;

import com.sphd.emanu.mvp.BasePresenterImpl;
import com.sphd.emanu.pojo.bank.BankMessageInfo;

import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;

/**
 * MVPPlugin
 * 邮箱 784787081@qq.com
 */

public class CardMessagePresenter extends BasePresenterImpl<CardMessageContract.View> implements CardMessageContract.Presenter {

    @Override
    public void accountMessage(String id) {
        emanuService.accountMessage(id).enqueue(new Callback<BankMessageInfo>() {
            @Override
            public void onResponse(Call<BankMessageInfo> call, Response<BankMessageInfo> response) {
                mView.setBean(response.body());
            }

            @Override
            public void onFailure(Call<BankMessageInfo> call, Throwable t) {
                Error(t);
            }
        });

    }
}
